package com.example.controller;

import com.example.entity.Comment;
import com.example.service.ApiCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApiCommentController {
    @Autowired
    private ApiCommentService apiCommentService;

    @GetMapping("/api/get/{id}")
    public Comment findById(@PathVariable("id") Integer id){
        return apiCommentService.findById(id);
    }
}
